<%--
    Document   : view fragment for listing posts
    Created on : Mar 10, 2014, 10:54:45 PM
    Author     : Anton Strack
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<div>
    <p>
        <c:if test="${plotCategories != null && plotCategories.size() > 0}">
        <ul>
            <c:forEach items="${plotCategories}" var="plotCategory" >
                <li>Plot: <a href="${req.contextPath}?action=view&resource=${fn:toLowerCase(plotCategory.getDerivedValue('ResourceTypeName'))}&id=${plotCategory.id}">${plotCategory.name}</a></li>
                </c:forEach>
        </ul>
    </c:if>
    <c:if test="${dialogCategories != null && dialogCategories.size() > 0}">
        <ul>
            <c:forEach items="${dialogCategories}" var="dialogCategory" >
                <li>Dialog: <a href="${req.contextPath}?action=view&resource=${fn:toLowerCase(dialogCategory.getDerivedValue('ResourceTypeName'))}&id=${dialogCategory.id}">${dialogCategory.name}</a></li>
                </c:forEach>
        </ul>
    </c:if>
    <c:if test="${characterCategories != null && characterCategories.size() > 0}">
        <ul>
            <c:forEach items="${characterCategories}" var="characterCategory" >
                <li>Character: <a href="${req.contextPath}?action=view&resource=${fn:toLowerCase(characterCategory.getDerivedValue('ResourceTypeName'))}&id=${characterCategory.id}">${characterCategory.name}</a></li>
                </c:forEach>
        </ul>
    </c:if>
    <c:if test="${locationCategories != null && locationCategories.size() > 0}">
        <ul>
            <c:forEach items="${locationCategories}" var="locationCategory" >
                <li>Location: <a href="${req.contextPath}?action=view&resource=${fn:toLowerCase(locationCategory.getDerivedValue('ResourceTypeName'))}&id=${locationCategory.id}">${locationCategory.name}</a></li>
                </c:forEach>
        </ul>
    </c:if>

</p>
</div>

